﻿@page
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.SettingManagement.Localization
@using Volo.Abp.SettingManagement.Web.Navigation
@using Volo.Abp.SettingManagement.Web.Pages.SettingManagement
@model IndexModel
@inject IHtmlLocalizer<AbpSettingManagementResource> L
@inject IPageLayout PageLayout
@{
    PageLayout.Content.Title = L["Settings"].Value;
    PageLayout.Content.MenuItemName = SettingManagementMenuNames.GroupName;
}
@section scripts {
    <abp-script-bundle name="@typeof(IndexModel).FullName">
        <abp-script src="/client-proxies/settingManagement-proxy.js" />
        <abp-script src="/Pages/SettingManagement/Index.js" />
    </abp-script-bundle>
}

<div id="SettingManagementWrapper">
    <abp-card>
        <abp-card-body>
            <abp-tabs tab-style="PillVertical" vertical-header-size="_3">
                @foreach (var group in Model.SettingPageCreationContext.Groups)
                {
                    <abp-tab title="@group.DisplayName">
                        <h2>@group.DisplayName</h2>
                        <hr class="my-4" />
                        @await Component.InvokeAsync(group.ComponentType, new
                        {
                            parameter = group.Parameter
                        })
                    </abp-tab>
                }
            </abp-tabs>
        </abp-card-body>
    </abp-card>
</div>
